package com.example.demo.model;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: su
 * Date: 2023-04-08
 * Time: 14:44
 */
@Data
public class Contact {
    Integer id;
    String name;
    String email;
    String subject;
    String message;
    Date time;

    public String getTime() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return simpleDateFormat.format(this.time);
    }
}